/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package rule;

import java.util.ArrayList;

/**
 *
 * @author Omega
 */
public class RuleTypeAnd2 extends NewRule{
    
    
    public RuleTypeAnd2(ArrayList<Clause> l){
        super(l);
    }
    
    public boolean ruleValue(){
        for(Clause c : getList())
        {
            if(!c.checkConditions())
                return false;
        }
        rulePunctuation();
        return true;
    }
    
    public String outputMessage(){
        StringBuffer message = new StringBuffer("");
        
        for(Clause c : getList())
        {
            message.append(c.outputMessage());
        }
        
        return message.toString();
    }
    
}
    
